PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Window Manager >

Programming With the Mac OS 8.5 Window Manager


SetWindowModified

Sets the modification state of the specified window.

pascal OSStatus SetWindowModified (
                     WindowPtr window,
                     Boolean modified);
window
A value of type WindowPtr . Pass a pointer to the window whose modification state is to be set.
modified
A value of type Boolean . Set to true to indicate that the content of the window has been modified; otherwise, set to false .
function result
A result code. See Result Codes.
DISCUSSION

Your application can use the functions SetWindowModified and IsWindowModified instead of maintaining its own separate record of the modification state of the content of a window.

Your application should distinguish between the modification state of the window and the modification state of the window's contents, typically a document. The modification state of the window contents are what should affect SetWindowModified . For example, in the case of a word processing document, you call SetWindowModified (passing true in the modified parameter) whenever the user types new characters into the document. However, you do not call SetWindowModified when the user moves the window, because that change does not affect the document contents. If you need to track whether the window position has changed, you need to do this with your own flag.

See Setting a Window's Modification State for an example of how your application might call the SetWindowModified function.

VERSION NOTES

Available with Mac OS 8.5 and later.


© 1999 Apple Computer, Inc. – (Last Updated 18 March 99)